public class GirlFriendTest {
    public static void main(String[] args) {
        GirlFriend[] arr=new GirlFriend[3];
        GirlFriend gf1=new GirlFriend("橙子",19,"女","看小说");
        GirlFriend gf2=new GirlFriend("小崽的后妈",21,"打游戏，看小说","女");
        GirlFriend gf3=new GirlFriend("七万",24,"看小说","女");
        arr[0]=gf1;
        arr[1]=gf2;
        arr[2]=gf3;
        int sum=0;
        for (int i = 0; i < arr.length; i++) {
            GirlFriend gf=arr[0];
            sum=sum+gf.getAge();
        }
        int avg=sum/arr.length;
        System.out.println(avg);
        int count=0;
        for (int i = 0; i < arr.length; i++) {
            GirlFriend gf=arr[i];
            if(gf.getAge()>avg)
            {
                count++;
                System.out.println(gf.getName()+","+gf.getAge()+","+gf.getHobby()+","+gf.getGender());
            }

        }
        System.out.println("大于平均年龄的有"+count+"个");
    }
}
